Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArgBuilder derivation for case classes containing only optional fields #2408

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

kyri-petrou
Copy link
Collaborator

@kyri-petrou kyri-petrou commented Sep 17, 2024

/fixes #2407

Issue was that we were treating all case classes as potential value types. Fix is to determine during compile-time whether the case class is a value type (either using annotations or checking if the case class extends AnyVal)

@guymers I also added the tests that were in #2403 to ensure that oneOf input derivation is working as expected now.

@kyri-petrou
Copy link
Collaborator Author

@ghostdogpr I noticed that we had some very similar logic for determining value types in SchemaDerivation. In order to avoid conflicts, I reused the same logic for both deriving schemas & arg builders

@kyri-petrou kyri-petrou merged commit e6b89ae into series/2.x Sep 20, 2024
10 checks passed
@kyri-petrou kyri-petrou deleted the fix-argbuilder-value-type-derivation branch September 20, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect behaviour of ArgBuilder containing only nullable fields when input is null
2 participants